import Vue from 'vue'
import VueRouter from 'vue-router'
import hot from './hot'
import recommend from './recommend/index'
import search from './search/index'
Vue.use(VueRouter)

const routes = [{
        path: '/',
        component: () =>
            import ('@/views/Recommend')
    },
    ...recommend,
    ...hot,
    ...search,
    {
        path: '/musicHome',
        component: () =>
            import ('@/views/musicHome')
    },
    {
        path: '/artistsSongList/:id',
        name: 'ArtistsSongList',
        component: () =>
            import ('@/views/ArtistsSongList')
    },
    {
        path: '/playlist/:id',
        component: () =>
            import ('@/views/PlayList')
    }
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})
export default router